package com.xky.feigin.controller;

import com.xky.feigin.domain.User;
import com.xky.feigin.service.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author keying.xia
 * @date 2017/12/14
 */
@RestController
public class Controller {

    @Autowired
    private Service service;

    @GetMapping(value = "/user/{id}")
    public User getUser(@PathVariable Long id){
        return service.findById(id);
    }



}
